package com.misty.observer_pattern.observer2;

import org.junit.Test;

import java.util.Observer;

public class Client {
    @Test
    public void client() {
        //观察者产生出来
        Observer liSi = new LiSi();
        Observer liuSi = new LiuSi();
        //定义出韩非子
        HanFeiZi hanFeiZi = new HanFeiZi();
        //我们后人根据历史，描述这个场景，有三个人在观察韩非子
        hanFeiZi.addObserver(liSi);
        hanFeiZi.addObserver(liuSi);
        //然后这里我们看看韩非子在干什么
        hanFeiZi.haveBreakfast();
    }
}
